<!--<template>-->
<!--  <div>-->
<!--    <div style="margin:10px 0;display: flex;flex-direction: row;justify-content: space-between;align-items: center;">-->
<!--    </div >-->
<!--    <div class="modify" style="margin: 10px 0;">-->
<!--      <el-button type="primary" style="font-size: 12px; " @click="addNews">新增-->
<!--        <i class="el-icon-circle-plus-outline"style="margin-left:5px;"></i>-->
<!--      </el-button>-->

<!--    </div >-->
<!--    <el-table :data="tableData"-->
<!--              style="width: 100%"-->
<!--              :default-sort = "{prop: 'date', order: 'descending'}"-->
<!--              selection-change="handleSelectionChange"-->
<!--              :header-cell-style="tableHeaderColor">-->
<!--      <el-table-column prop="title" label="标题" sortable width="600"></el-table-column>-->
<!--      <el-table-column prop="showTime" label="发布时间" sortable width="300"></el-table-column>-->

<!--      <el-table-column label="操作" >-->
<!--        <template v-slot="scope" >-->
<!--          <el-button type="success" @click.native.prevent="modifyAnnouncement(scope.$index)">编辑 <i class="el-icon-edit"></i></el-button>-->
<!--          <el-popconfirm-->
<!--              class="ml-5"-->
<!--              confirm-button-text='确定'-->
<!--              cancel-button-text='我再想想'-->
<!--              icon="el-icon-info"-->
<!--              icon-color="red"-->
<!--              title="确定要删除吗？"-->
<!--              @confirm="delAnnouncement(scope.$index)">-->
<!--            <el-button type="danger" slot="reference">删除 <i class="el-icon-remove-outline"></i></el-button>-->
<!--          </el-popconfirm>-->
<!--        </template>-->
<!--      </el-table-column>-->
<!--    </el-table>-->

<!--    <el-dialog :title="title" :visible.sync="dialogFormVisible">-->
<!--      <el-form :rules="rules" label-width="100px">-->
<!--        <el-form-item label="标题" prop="title">-->
<!--          <el-input v-model="form.title" autocomplete="off"-->
<!--                    :placeholder="form.title"></el-input>-->
<!--        </el-form-item>-->

<!--        <el-form-item label="内容" prop="content">-->
<!--          <el-input type="textarea" v-model="form.content" autocomplete="off"-->
<!--                    :placeholder="form.content"></el-input>-->
<!--        </el-form-item>-->

<!--      </el-form>-->
<!--      <div slot="footer" class="dialog-footer">-->
<!--        <el-button @click="cancel">取 消</el-button>-->
<!--        <el-button type="primary" @click="saveNews">保 存</el-button>-->
<!--      </div>-->
<!--    </el-dialog>-->

<!--    &lt;!&ndash;分页 end&ndash;&gt;-->
<!--    <div class="pagination">-->
<!--      <el-pagination-->
<!--          @size-change="handleSizeChange"-->
<!--          @current-change="handleCurrentChange"-->
<!--          :current-page.sync="pageNum"-->
<!--          :page-sizes="[5,10, 30, 50, 100]"-->
<!--          :page-size="pageSize"-->
<!--          layout="total, sizes, prev, pager, next, jumper"-->
<!--          :total="count">-->
<!--      </el-pagination>-->
<!--    </div>-->
<!--    &lt;!&ndash;分页 end&ndash;&gt;-->
<!--  </div>-->
<!--</template>-->

<!--<script>-->
<!--export default {-->
<!--  name: "Announcement",-->

<!--  data() {-->
<!--    return {-->
<!--      //设置页签-->
<!--      plate:"公告声明",-->
<!--      tableData: [],-->
<!--      count: 0,-->
<!--      pageNum: 1,-->
<!--      pageSize: 5,-->
<!--      state:"全部",-->
<!--      search: "",-->
<!--      multipleSelection: [],-->
<!--      dialogFormVisible: false,-->
<!--      form: {-->
<!--        title:"",-->
<!--        content:"",-->
<!--      },-->
<!--      rules: {-->
<!--        title: [-->
<!--          { type: "any",required: true, message: "请输入标题", trigger: "blur"},-->
<!--        ]-->
<!--      },-->
<!--      dialogFormName: "",-->
<!--    }-->
<!--  },-->

<!--  created() {-->
<!--    this.load();-->
<!--    this.$emit("generateTab",this.plate,this.func)-->
<!--    this.clearForm();-->
<!--  },-->

<!--  methods: {-->
<!--    //新增按钮-->
<!--    addNews() {-->
<!--      this.clearForm();-->
<!--      this.title = "发布新的公告";-->
<!--      this.dialogFormVisible = true;-->
<!--    },-->
<!--    // 修改table header的背景-->
<!--    tableHeaderColor({row, column, rowIndex, columnIndex}) {-->
<!--      if (rowIndex === 0) {-->
<!--        return 'background-color: #e0f6fe;color: #303133;font-weight: 600;font-size:12px;'-->
<!--      }-->
<!--    },-->
<!--    //-->
<!--    clearForm() {-->
<!--      this.form = {-->
<!--        title: "",-->
<!--        content: "",-->
<!--      }-->
<!--    },-->

<!--    checkEmpty(x) {-->
<!--      return x === "" || x === null || x === undefined;-->
<!--    },-->

<!--    //点击确认保存新闻信息-->
<!--    checkForm() {-->
<!--      if (!this.checkEmpty(this.form.title)) {-->
<!--        return {code: true};-->
<!--      } else return {code: false, msg: "没有标题！"}-->
<!--    },-->

<!--    saveNews() {-->
<!--      let r = this.checkForm();-->
<!--      console.log(r);-->
<!--      if (!r.code) {-->
<!--        this.$message.error(r.msg);-->
<!--        return;-->
<!--      }-->
<!--      this.dialogFormVisible = false;-->
<!--      this.request.post("/announcement", this.form).then(res => {-->
<!--        console.log(res)-->
<!--        if (res.code === "200") {-->
<!--          this.$message.success("保存成功！");-->
<!--          this.load();-->
<!--        } else {-->
<!--          this.$message.error(res.msg);-->
<!--          this.load();-->
<!--        }-->
<!--      })-->
<!--    },-->

<!--    cancel() {-->
<!--      this.dialogFormVisible = false;-->
<!--      this.load();-->
<!--    },-->

<!--    handleSizeChange(pageSize) {-->
<!--      console.log("pageSize:" + pageSize);-->
<!--      this.pageSize = pageSize;-->
<!--      this.load();-->
<!--    },-->
<!--    handleCurrentChange(pageNum) {-->
<!--      console.log("pageNum:" + pageNum);-->
<!--      this.pageNum = pageNum;-->
<!--      this.load();-->
<!--    },-->
<!--    clearAndLoad() {-->
<!--      this.pageNum = 1;-->
<!--      this.pageSize = 5;-->
<!--      this.search = "";-->
<!--      this.load();-->
<!--    },-->

<!--    load() {-->
<!--      //axios方式http://localhost:9090前缀写在了request.js文件中，可省略-->
<!--      this.request({-->
<!--        url: "/announcement/page",-->
<!--        method: "GET",-->
<!--        params: {-->
<!--          pageNum: this.pageNum,-->
<!--          pageSize: this.pageSize,-->
<!--          search: this.search,-->
<!--          state: this.state-->
<!--        },-->
<!--      }).then(-->
<!--          res => {-->
<!--            console.log(res.data.records);-->
<!--            this.tableData = res.data.records.map(a => {-->
<!--              a.showTime = a.time.slice(0,10)+ "\t"+a.time.slice(11,20);-->
<!--              return a;-->
<!--            })-->
<!--            this.count = res.data.total;-->
<!--          }-->
<!--      )-->
<!--    },-->

<!--    modifyAnnouncement(idx) {-->
<!--      let res = this.tableData[idx];-->
<!--      this.dialogFormVisible = true;-->
<!--      this.form = res;-->
<!--      //将地址填入-->
<!--      this.title = "编辑";-->
<!--      this.content = res.content;-->
<!--    },-->

<!--    delAnnouncement(idx) {-->
<!--      let id = this.tableData[idx].id;-->
<!--      this.request.delete("/announcement/delById", {-->
<!--        params: {-->
<!--          id: id-->
<!--        }-->
<!--      }).then(res => {-->
<!--        console.log(res)-->
<!--        if (res.code === "200") {-->
<!--          this.$message.success("删除成功！");-->
<!--          this.load();-->
<!--        } else {-->
<!--          this.$message.error("删除失败！");-->
<!--        }-->
<!--      })-->
<!--    },-->
<!--  }-->
<!--}-->
<!--</script>-->

<!--<style scoped>-->

<!--</style>-->
